﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ExchangeCurrencyRate.Web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox runat="server" ID="ValueTextBox" />
        <asp:DropDownList runat="server" ID="FromCurrencyDropDownList">
            <asp:ListItem Value="USD">US Dollar</asp:ListItem>
            <asp:ListItem Value="EUR">Euro</asp:ListItem>
            <asp:ListItem Value="RUB">Russian Ruble</asp:ListItem>
        </asp:DropDownList>
        <asp:DropDownList runat="server" ID="ToCurrencyDropDownList">
            <asp:ListItem Value="USD">US Dollar</asp:ListItem>
            <asp:ListItem Value="EUR">Euro</asp:ListItem>
            <asp:ListItem Value="RUB">Russian Ruble</asp:ListItem>
        </asp:DropDownList>
        <asp:Button runat="server" Text="Convert" OnClick="ConvertMoneyButton_Click" />
        <asp:Label runat="server" ID="ResultValueLabel" />
    </div>
    <div>
        <asp:RequiredFieldValidator runat="server" ControlToValidate="ValueTextBox" EnableClientScript="true" ErrorMessage="* enter money amount to convert" Display="Dynamic" />
    </div>
    <div>
        <asp:RequiredFieldValidator runat="server" ControlToValidate="FromCurrencyDropDownList" EnableClientScript="true" ErrorMessage="* select 'from' currency" Display="Dynamic" />
    </div>
    <div>
        <asp:RequiredFieldValidator runat="server" ControlToValidate="ToCurrencyDropDownList" EnableClientScript="true" ErrorMessage="* select 'to' currency" Display="Dynamic" />
    </div>
    <div>
        <asp:CustomValidator runat="server" ID="InvalidCurrencyCodeValidator" Display="Dynamic" />
    </div>
    </form>
</body>
</html>
